﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Stack stack = new Stack();

            stack.Push("李");
            stack.Push("孙");
            stack.Push("钱");
            stack.Push("赵");
            stack.Push("百家姓:");

            Object[]objeck= stack.ToArray();
            foreach (var item in objeck)
            {
                Console.WriteLine(item);
            }

            if (stack.Contains("王"))
            {
                Console.WriteLine("这是真的百家姓");
            }
            else
            {
                Console.WriteLine("这是假的百家姓");
            }
        }
    }
}
